import Mock from 'mockjs'
import { tableData, experienceInfo, chartData } from '@/miscellaneous/index'

// 使用Mock.mock创建拦截器
// 参数1: 匹配的路径  参数2: 请求方法  参数3: 返回的数据
Mock.mock(/\/api\/getTableData/, 'get', {
  code: 200,
  message: 'success',
  data: tableData
})
Mock.mock(/\/api\/getExperienceInfo/, 'get', {
  code: 200,
  message: 'success',
  data: experienceInfo
})
Mock.mock(/\/api\/getChartData/, 'get', {
  code: 200,
  message: 'success',
  data: chartData
})

// 确保Mock生效
console.log('Mock.js已加载，表格数据已准备就绪')
